{template "content","header"}
<style>
	.docs-pictures {
    margin: 0;
    padding: 0;
}
.docs-pictures > div{

 	text-align: center;

}
</style>
          <!-- Right side column. Contains the navbar and content of the page -->
            <aside class="right-side" id="mainbody">
                <!-- Content Header (Page header) -->
               <section class="content-header">
                    <h1><i class="fa {$CAT['caticon']}"></i> {$CAT['catname']}</h1>
                    
                   
                   <!--{var_dump($CAT)}-->
                    <ol class="breadcrumb">
                        <li><a href="#"><i class="fa fa-dashboard"></i> 首页</a></li>
                       
                        <li class="active"><i class="fa {$CAT['caticon']}"></i> <a href="{$CAT['url']}">{$CAT['catname']}</a>  > 显示</li>
                    </ol>
                    
                </section>

                <!-- Main content -->
                <section class="content">

<div class="nav-tabs-custom">
                                <ul class="nav nav-tabs">
                                    <li class="active"><a href="#tab_1" data-toggle="tab"><i class="fa fa-table"></i> PDF文件</a></li>
                                    <li><a href="#tab_2" data-toggle="tab"><i class="fa fa-table"></i> 图片文件</a></li>
                                    <!--<li class="dropdown">
                                        <a class="dropdown-toggle" data-toggle="dropdown" href="#">
                                            下拉 <span class="caret"></span>
                                        </a>
                                        <ul class="dropdown-menu">
                                            <li role="presentation"><a role="menuitem" tabindex="-1" href="#">Action</a></li>
                                            <li role="presentation"><a role="menuitem" tabindex="-1" href="#">Another action</a></li>
                                            <li role="presentation"><a role="menuitem" tabindex="-1" href="#">Something else here</a></li>
                                            <li role="presentation" class="divider"></li>
                                            <li role="presentation"><a role="menuitem" tabindex="-1" href="#">Separated link</a></li>
                                        </ul>
                                    </li>-->
                              
                                    <li class="pull-right"><a href="{$CAT['url']}" class="text-muted">{$title}<i class="fa fa-backward"></i>  返回</a></li>
                                </ul>
                                <div class="tab-content">
                                    <div class="tab-pane active" id="tab_1">
                                    		{if count(string2array($rs[pdf]))>0}
                                        	{loop string2array($rs[pdf]) $ra}
                                        		<!--{$ra['fileurl']}{$ra['filename']}-->
                                        		 <iframe src="statics/pdf.js/index.html?file={$ra['fileurl']}"  value="{$ra['fileurl']}" width="100%" height="800"></iframe>
                   							{/loop}
                   							{else}
                   								此文档没有PDF文件！
                   								{/if}
                   							
                   												
                                       
                                    </div><!-- /.tab-pane -->
                                    <div class="tab-pane" id="tab_2">

																	<div class="docs-pictures row">
																				{loop $pics  $r}
																				<div class="col-md-4">
																					<img src="{$r[url]}" alt="{$r[alt]}" style="width:200px;">
																				</div>
																				{/loop}
																	</div>
																		
                                    </div><!-- /.tab-pane -->
                                </div><!-- /.tab-content -->
                            </div>





	

                </section><!-- /.content -->
            </aside><!-- /.right-side -->
        </div><!-- ./wrapper -->

        <!-- add new calendar event modal -->

<script type="text/javascript" src="{APP_PATH}api.php?op=count&id={$id}&modelid={$modelid}"></script>
<script>	
$('.docs-pictures').viewer();
</script>
    </body>
</html>